<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>使用原生JS实现canvas的绘制与拖动</title>
</head>
<body>
    <!-- 颜色选择框,用于填充绘制图形的颜色 -->
   <input type="color"></input>
   <!-- 绘画区域 -->
   <canvas></canvas>
</body>
<script src="./index.js"></script>
</html>
<style>
    body{
   display:flex;
   flex-direction:column;
   align-items:center; 
   justify-content:center;
}

input{
    margin:20px;
}

canvas{
    background-color: rgb(100, 100, 100);
}
</style>